#include <iostream>
#include <string>

using namespace std;

int main()
{
    string a;
    int i;
    cin >> a;
    int tmp[26] = {0};
    for (auto x : a)
    {
        ++tmp[x - 'a'];
    }
    for (i = 0; i < a.size(); ++i)
    {
        if (tmp[a[i] - 'a'] == 1)
        {
            cout << a[i] << endl;
            break;
        }
    }
    if (i == a.size())
    {
        cout << -1 << endl;
    }
    return 0;
}